#include "infoconstructor.h"
#include "../core/setting.h"
#include "../activite/webcollector.h"

InfoConstructor::InfoConstructor()
    : m_info(Json::objectValue)
{
}

InfoConstructor::~InfoConstructor()
{
}

void InfoConstructor::set(std::string key, std::string value)
{
    m_info[key.c_str()] = Json::Value(value);
}

void InfoConstructor::set(std::string key, int value)
{
    m_info[key.c_str()] = Json::Value(value);
}

void InfoConstructor::set(std::string key, Json::Value value)
{
    m_info[key.c_str()] = value;
}

ProcessRouter::CMessage InfoConstructor::message()
{
    int ret = 0;
    std::string m = info();
    return ProcessRouter::CMessage(m);
}

std::string InfoConstructor::info()
{
    Json::FastWriter writer;
    return writer.write(m_info);
}

